home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
- Begin VB.Form frmText1
- Caption = "Document"
- ClientHeight = 2850
- ClientLeft = 1875
- ClientTop = 3945
- ClientWidth = 6510
- Icon = "frmText1.frx":0000
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 2850
- ScaleWidth = 6510
- Begin RichTextLib.RichTextBox rtfBox1
- Height = 2775
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 6495
- _ExtentX = 11456
- _ExtentY = 4895
- _Version = 393217
- ScrollBars = 2
- TextRTF = $"frmText1.frx":27A2
- End
- Attribute VB_Name = "frmText1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim DocChanged As Boolean
- Private Sub rtfBox1_SelChange()
- fMainForm.tbToolBar.Buttons("Bold").Value = IIf(rtfBox1.SelBold, tbrPressed, tbrUnpressed)
- fMainForm.tbToolBar.Buttons("Italic").Value = IIf(rtfBox1.SelItalic, tbrPressed, tbrUnpressed)
- fMainForm.tbToolBar.Buttons("Underline").Value = IIf(rtfBox1.SelUnderline, tbrPressed, tbrUnpressed)
- End Sub
- Private Sub Form_Load()
- Form_Resize
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- rtfBox1.Move 100, 100, Me.ScaleWidth - 200, Me.ScaleHeight - 200
- rtfBox1.RightMargin = rtfBox1.Width - 400
- End Sub
- Private Sub Form_Activate()
- fMainForm.StatusBar1.Panels(3).Text = Me.Caption
- fMainForm.lblDocName.Caption = Me.Caption
- fMainForm.tbToolBar.Buttons(9).Enabled = True
- fMainForm.tbToolBar.Buttons(10).Enabled = True
- fMainForm.tbToolBar.Buttons(11).Enabled = True
- fMainForm.tbToolBar.Buttons("Bold").Value = IIf(rtfBox1.SelBold, tbrPressed, tbrUnpressed)
- fMainForm.tbToolBar.Buttons("Italic").Value = IIf(rtfBox1.SelItalic, tbrPressed, tbrUnpressed)
- fMainForm.tbToolBar.Buttons("Underline").Value = IIf(rtfBox1.SelUnderline, tbrPressed, tbrUnpressed)
- End Sub
- Private Sub Form_Unload(cancel As Integer)
- fMainForm.tbToolBar.Buttons(9).Enabled = False
- fMainForm.tbToolBar.Buttons(10).Enabled = False
- fMainForm.tbToolBar.Buttons(11).Enabled = False
- If DocChanged Then
- Select Case MsgBox("The file " & Me.Caption & " has changed!" & vbCr & vbCr & _
- "Do you wish to save your changes?", _
- vbExclamation + vbYesNoCancel, "-- " & Me.Caption & " has changed!")
- Case vbYes
- MsgBox "You Chose Yes :(. Oh Well.. Save After Exit not yet added! Due to a small problem :)"
- ' fMainForm.mnuFileSave
- Case vbNo
- Unload Me
- Case vbCancel
- cancel = True
- End Select
- End If
- End Sub
- Private Sub rtfBox1_Change()
- ' Changes the docchanged value to true for saving purposes.
- DocChanged = True
- fMainForm.mnuFileSave.Enabled = True
- End Sub
-